package com.ifnk.portaljava.dapWeb.pojo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Role implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2805185222670788929L;
	private int id;
	private String roleName;
	private Long roleCode;
	private Set<User> userSet = new HashSet<User>();
	private Set<Permission> permissionSet = new HashSet<Permission>();

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public Long getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(Long roleCode) {
		this.roleCode = roleCode;
	}

	public Set<User> getUserSet() {
		return userSet;
	}

	public void setUserSet(Set<User> userSet) {
		this.userSet = userSet;
	}

	public Set<Permission> getPermissionSet() {
		return permissionSet;
	}

	public void setPermissionSet(Set<Permission> permissionSet) {
		this.permissionSet = permissionSet;
	}

	@Override
	public String toString() {
		return "roleId="+this.id+","+"roleName"+this.roleName+","
		+"roleCode"+","+"userSet"+this.userSet.toString()+","+"permissionSet"+this.getPermissionSet().toString();
	}
    
}
